package com.example.actionsignin.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * Created by 旭 on 2017/8/10/010.
 */

public class ManageAdapter extends FragmentPagerAdapter {

    List<Fragment> mList_fragment;
    List<String> mList_title;

    public ManageAdapter(FragmentManager fm, List<Fragment> list_fragment, List<String> list_title) {
        super(fm);
        this.mList_fragment = list_fragment;
        this.mList_title = list_title;
    }

    @Override
    public Fragment getItem(int position) {
        return mList_fragment.get(position);
    }

    @Override
    public int getCount() {
        return mList_title.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return mList_title.get(position % mList_title.size());
    }
}
